﻿using auxiliary_proj;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;

namespace FirstUnitTests
{
    
    
    /// <summary>
    ///This is a test class for ParserTest and is intended
    ///to contain all ParserTest Unit Tests
    ///</summary>
    [TestClass()]
    public class ParserTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for testEmailRegex
        ///</summary>
        [TestMethod()]
        public void testEmailRegexTest()
        {
            Parser target = new Parser(); // TODO: Initialize to an appropriate value
            string email = "abc@email.com"; // TODO: Initialize to an appropriate value
            string email1 = "bj00271@aol.com";
            string email2 = "person@email";
            bool expected = true; // TODO: Initialize to an appropriate value
            bool expected1 = true;
            bool expected2 = false;
            bool actual;
            bool actual1;
            bool actual2;
            actual = target.testEmailRegex(email);
            actual1 = target.testEmailRegex(email1);
            actual2 = target.testEmailRegex(email2);
            Assert.AreEqual(expected, actual);
            Assert.AreEqual(expected1, actual1);
            Assert.AreEqual(expected2, actual2);
        }

        /// <summary>
        ///A test for testNameRegex
        ///</summary>
        [TestMethod()]
        public void testNameRegexTest()
        {
            Parser target = new Parser(); // TODO: Initialize to an appropriate value
            string name = "Bunama"; // TODO: Initialize to an appropriate value
            string name1 = "David";
            string name2 = "User123";
            bool expected = true; // TODO: Initialize to an appropriate value
            bool expected1 = true;
            bool expected2 = false;
            bool actual;
            bool actual1;
            bool actual2;
            actual = target.testUserNameRegex(name);
            actual1 = target.testUserNameRegex(name1);
            actual2 = target.testUserNameRegex(name2);
            Assert.AreEqual(expected, actual);
            Assert.AreEqual(expected1, actual1);
            Assert.AreEqual(expected2, actual2);
        }

        /// <summary>
        ///A test for testUserInfoRegex
        ///</summary>
        [TestMethod()]
        public void testUserInfoRegexTest()
        {
            Parser target = new Parser(); // TODO: Initialize to an appropriate value
            string userInfo = "User123"; // TODO: Initialize to an appropriate value
            string userInfo1 = "damion_6891";
            string userInfo2 = "$Zach";
            bool expected = true; // TODO: Initialize to an appropriate value
            bool expected1 = true;
            bool expected2 = false;
            bool actual;
            bool actual1;
            bool actual2;
            actual = target.testUserPasswordRegex(userInfo);
            actual1 = target.testUserPasswordRegex(userInfo1);
            actual2 = target.testUserPasswordRegex(userInfo2);
            Assert.AreEqual(expected, actual);
            Assert.AreEqual(expected1, actual1);
            Assert.AreEqual(expected2, actual2);
        }
    }
}
